<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/common_setting_unit.php"); ?>
<?php include_once("../controller/detail-list.php"); ?>




<?php
//补充一下所属板块
$_REQUEST['ai_belong']=$system_part;
$new_detail_nid = addslashes($_REQUEST['nid']);


//传递过来的页面信息。返回的时候，会根据这些信息返回原来的页面
$nowpageid      = addslashes($_REQUEST['nowpageid']);
$sortby         = addslashes($_REQUEST['sortby']);
$term_nid       = addslashes($_REQUEST['term_nid']);
?>




<?

//这里是设计上传文件的部分：包含图片和附件。视频也应该用这种形式上传
//统一设置一下保存图片的路径
$_uf['path']        = ROOT_PATH_ . "/uploadfiles/".$theme_folder."/";





//上传icon
if (is_uploaded_file($_FILES['icon']['tmp_name']))
{
    $_uf['upfile']       = $_FILES['icon'];
    $_info               = upload_file($_uf);
    $_REQUEST['ai_icon'] = $_info['name'];
    $icon          = $_REQUEST['ai_icon'];


}

//上传Banner
if (is_uploaded_file($_FILES['banner']['tmp_name']))
{
    $_uf['upfile']       = $_FILES['banner'];
    $_info               = upload_file($_uf);
    $_REQUEST['ai_banner'] = $_info['name'];
    $banner        = $_REQUEST['ai_banner'];

}

?>








<?php


$sqlstr=insert_date($table_prefix."detail",$_REQUEST);
sql_log($sqlstr);
$query = mysql_query($sqlstr) or die (mysql_error()."<br/>".$sqlstr);

mysql_close($con);



?>




<script type="text/javascript">
alert("输入信息已保存，点击确认返回继续操作.");
document.location.href = "detail-list.php?sys_part=<? echo $system_part ?>&nav_l2=detail-list";
</script>


